package edu.wtbu.pojo;

public class User {

	int UserId;
	String Email;
	String FirstName;
	String LastName;
	String Password;
	String Gender;
	String DateOfBirth;
	String Phone;
	String Photo;
	String Address;
	int RoleId;
	
	
	public int getUserId()
	{
		return UserId;
	}
	
	public void setUserId(int dd)
	{
		this.UserId=dd;
	}
	
	public int getRoleId()
	{
		return RoleId;
	}
	
	public void setRoleId(int dd)
	{
		this.RoleId=dd;
	}
	
	public String getEmail()
	{
		return Email;
	}
	
	public void setEmail(String dd)
	{
		this.Email=dd;
	}
	
	public String getFirstName()
	{
		return FirstName;
	}
	
	public void setFirstName(String dd)
	{
		this.FirstName=dd;
	}
	
	public String getLastName()
	{
		return LastName;
	}
	
	public void setLastName(String dd)
	{
		this.LastName=dd;
	}
	
	public String getPassword()
	{
		return Password;
	}
	
	public void setPassword(String dd)
	{
		this.Password=dd;
	}
	
	public String getGender()
	{
		return Gender;
	}
	
	public void setGender(String dd)
	{
		this.Gender=dd;
	}
	
	public String getDateOfBirth()
	{
		return DateOfBirth;
	}
	
	public void setDateOfBirth(String dd)
	{
		this.DateOfBirth=dd;
	}
	
	public String getPhone()
	{
		return Phone;
	}
	
	public void setPhone(String dd)
	{
		this.Phone=dd;
	}
	
	public String getPhoto()
	{
		return Photo;
	}
	
	public void setPhoto(String dd)
	{
		this.Photo=dd;
	}
	
	public String getAddress()
	{
		return Address;
	}
	
	public void setAddress(String dd)
	{
		this.Address=dd;
	}
	
	public User() {}
	public User(Object[] objects) {
		
		try {
			this.setUserId(Integer.parseInt(objects[0].toString()));
		} catch (Exception e) {
			// TODO: handle exception
			this.setUserId(0);
		}
		
		try {
			this.setEmail(objects[1].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setEmail("");
		}
		
		try {
			this.setFirstName(objects[2].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setFirstName("");
		}
		
		try {
			this.setLastName(objects[3].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setLastName("");
		}
		
		try {
			this.setPassword("");
		} catch (Exception e) {
			// TODO: handle exception
			this.setPassword("");
		}
		
		try {
			this.setGender(objects[5].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setGender("");
		}
		
		try {
			this.setDateOfBirth(objects[6].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setDateOfBirth("");
		}
		
		try {
			this.setPhone(objects[7].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setPhone("");
		}
		
		try {
			this.setPhoto(objects[8].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setPhoto("");
		}
		
		try {
			this.setAddress(objects[9].toString());
		} catch (Exception e) {
			// TODO: handle exception
			this.setAddress("");
		}
		
		try {
			this.setRoleId(Integer.parseInt(objects[10].toString()));
		} catch (Exception e) {
			// TODO: handle exception
			this.setRoleId(0);
		}
	}
}
